import 'package:flutter/material.dart';

import 'HouseManagement_page.dart';

class ProfilePage extends StatefulWidget {
  const ProfilePage({super.key});

  @override
  State<ProfilePage> createState() => _ProfilePageState();
}

class _ProfilePageState extends State<ProfilePage> {
  @override
  Widget build(BuildContext context) {
    double scrW = MediaQuery.of(context).size.width;
    double scrH = MediaQuery.of(context).size.height;
    return Scaffold(
      appBar: AppBar(
        automaticallyImplyLeading: false,
        backgroundColor: Color.fromRGBO(195, 161, 162, 1.0),
        title: Center(
            child: Text(
          'Profile',
          style: TextStyle(color: Colors.white),
        )),
        actions: [
          Text(
            'Sign out',
            style: TextStyle(color: Colors.white),
          )
        ],
      ),
      body: Container(
        width: scrW,
        child: Column(
          mainAxisAlignment: MainAxisAlignment.spaceEvenly,
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            Column(
              children: [
                Container(
                  margin: EdgeInsets.only(top: 40),
                  width: 200,
                  height: 200,
                  child: Center(
                    child: Text(
                      'User\navatar',
                      style: TextStyle(fontSize: 40),
                    ),
                  ),
                  decoration: BoxDecoration(
                      border: Border.all(width: 1, color: Colors.grey),
                      borderRadius: BorderRadius.circular(100)),
                ),
                SizedBox(
                  height: 10,
                ),
                Text('Nickname\nSignature'),
              ],
            ),
            Container(
              padding: EdgeInsets.symmetric(horizontal: 20),
              width: scrW - 40,
              height: 60,
              child: Row(
                children: [
                  Text(
                    'Number of house',
                    style: TextStyle(fontSize: 18),
                  ),
                  Expanded(
                      child: Center(
                          child: Text(
                    '1',
                    style: TextStyle(fontSize: 30),
                  )))
                ],
              ),
              decoration: BoxDecoration(
                  border: Border.all(width: 1, color: Colors.grey),
                  borderRadius: BorderRadius.circular(20)),
            ),
            Container(
              width: scrW - 80,
              child: Column(
                children: [
                  Row(
                    children: [
                      Container(
                        width: 45,
                        height: 40,
                        child: Center(
                          child: Text('aaa'),
                        ),
                        decoration: BoxDecoration(
                          border: Border.all(width: 1, color: Colors.grey),
                        ),
                      ),
                      GestureDetector(
                          onTap: () {
                            Navigator.push(context,
                                MaterialPageRoute(builder: (context) {
                              return HouseManagementPage();
                            }));
                          },
                          child: Container(
                              width: 160,
                              child: Center(child: Text('House Management'))))
                    ],
                  ),
                  Container(
                    margin: EdgeInsets.symmetric(vertical: 10),
                    height: 1,
                    color: Colors.grey,
                  ),
                  Row(
                    children: [
                      Container(
                        width: 45,
                        height: 40,
                        child: Center(
                          child: Text('aaa'),
                        ),
                        decoration: BoxDecoration(
                          border: Border.all(width: 1, color: Colors.grey),
                        ),
                      ),
                      Container(
                          width: 160, child: Center(child: Text('Clear cache')))
                    ],
                  ),
                  Container(
                    margin: EdgeInsets.symmetric(vertical: 10),
                    height: 1,
                    color: Colors.grey,
                  ),
                  Row(
                    children: [
                      Container(
                        width: 45,
                        height: 40,
                        child: Center(
                          child: Text('aaa'),
                        ),
                        decoration: BoxDecoration(
                          border: Border.all(width: 1, color: Colors.grey),
                        ),
                      ),
                      Container(width: 160, child: Center(child: Text('About')))
                    ],
                  ),
                ],
              ),
            )
          ],
        ),
      ),
    );
  }
}
